<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        p{
            margin-top: 100px;
            text-align: center;
        }
    </style>
</head>
<body>
    <p>
        <input type="text" placeholder="请输入歌名或歌手名">
        <button>搜索</button>
    </p>
    <script>
        let btn=document.querySelector("button");
        let input=document.querySelector("input");
        btn.addEventListener("click",function(){
            sessionStorage.setItem("data",input.value);
            location.href="./index.html";
        })
    </script>
</body>
</html>